﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TimeTableManagement.Entities.Tb_Log>>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" HeaderText="Database Log"
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
        CellPadding="4" DataSourceID="LinqDataSource1" ForeColor="#333333" 
        GridLines="None" AllowPaging="True">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="date" HeaderText="Date" ReadOnly="True" 
                SortExpression="date" />
            <asp:BoundField DataField="type" HeaderText="Type" ReadOnly="True" 
                SortExpression="type" />
            <asp:BoundField DataField="action" HeaderText="Action" ReadOnly="True" 
                SortExpression="action" />
            <asp:BoundField DataField="user" HeaderText="User" ReadOnly="True" 
                SortExpression="user" />
            <asp:BoundField DataField="result" HeaderText="Result" ReadOnly="True" 
                SortExpression="result" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView></dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="TimeTableManagement.QLSVContext" EntityTypeName="" 
        Select="new (date, type, action, user, result)" TableName="Tb_Log" 
        Where="option == @option" OrderBy="id desc">
        <WhereParameters>
            <asp:QueryStringParameter DefaultValue="database" Name="option" 
                QueryStringField="option" Type="String" />
        </WhereParameters>
    </asp:LinqDataSource>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
